package com.odianyun.hello.web.controller;

import com.odianyun.hello.model.DTO.IUUserIdentityDTO;
import com.odianyun.hello.service.IUUserIdentityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Api(tags =  "用户标签管理")
@RequestMapping("uuserIdentity")
public class UUserIdentityController {
    @Resource
    private IUUserIdentityService userIdentityService;

    @ApiOperation("更新用户标签")
    @PostMapping("updateIdentity")
    public void updateIdentity(@RequestBody IUUserIdentityDTO dto){
        userIdentityService.updateIdentity(dto);
    }

    @ApiOperation("查询用户标签")
    @PostMapping("findLabelById")
    public List<String>  findLabelById(Long id){
        List<String> list = userIdentityService.findLabelById(id);
        return list;
    }


}
